/** The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
 *
 * The Original Code is Fluid-Cubed (at http://www.adamldavis.com/crystal/fluid.html).
 *
 * The Initial Developer of the Original Code is Adam L. Davis. 
 * Portions created by Adam L. Davis are Copyright (C) 2008 Adam L. Davis. All Rights Reserved.
 *
 * Contributor(s): Adam L. Davis.
 */
package tractorlk.game;

import java.awt.Color;
import java.awt.Polygon;
import java.awt.Toolkit;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import tractorlk.drops.Board;
import tractorlk.drops.Card;
import tractorlk.drops.Deck;
import tractorlk.drops.Hand;

/**
 * @author Adam
 */
public class OngoingFluidGame implements FluidGame {

	//private static final String IMAGES_BACK1 = "/images/back1.jpg";

	//private static final String IMAGES_BACK2 = "/images/back2.jpg";

//	long time = 0;

//	int level = 0;

	//final List<DropCatcher> catchers = new ArrayList<DropCatcher>();

	//private List<DropGenerator> generators = new ArrayList<DropGenerator>();

	Board engine;

//	Random rnd = new Random();

	/*final*/ List<Card> cards = new ArrayList<Card>();
        Deck theDeck;
        Hand myHand;
	/*
	 * (non-Javadoc)
	 * 
	 * @see tractorlk.game.FluidGame#start(tractorlk.drops.Board)
	 */
	public void start(final Board engine) {
//		level++;
//		this.engine = engine;
  //              theDeck = new Deck();
    //            myHand = new Hand(theDeck, 1);
		//engine.setImage(Toolkit.getDefaultToolkit().getImage(
		//		Board.class.getResource(level < 5 ? IMAGES_BACK1
		//				: IMAGES_BACK2)));

		//final Color[] colors = new Color[level];

		//for (int i = 0; i < level; i++) {
		//	colors[i] = new Color(rnd.nextInt(200) + 20, rnd.nextInt(200) + 20,
		//			rnd.nextInt(200) + 20);
		//}
	//	int width = (int) (engine.getSize().width * 0.6);

	//	cards.clear();
          //      myHand.sortHand(2, 2);

               //cards = theDeck.deal(1);
	//	engine.setCards(cards);
               // engine.setSurfaces(myHand.getHand());

		
	}


	/** Create droplets and check if done with level. */
	public void run() {
//		time++;
		//boolean done = true;
		//for (DropCatcher dc : catchers) {
		//	done = done && dc.isFull();
		//}
		//if (done) {
		//	start(engine); // increment level
		//}
	}

	/** Restart at level 0. */
	public void restart(Board engine) {
//		level = 0;
	//	start(engine);
	}

}
